package com.huangmb.anymark.app.model;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * 用户类
 *
 * @author hmb
 * @version 1.0
 * @since 2016/5/3 22:19
 */
public class User implements Parcelable{
    private int id;
    private String mName;
    private String mPassword;
    private Sex mSex;

    public User() {
    }

    protected User(Parcel in) {
        id = in.readInt();
        mName = in.readString();
        mPassword = in.readString();
    }

    public static final Creator<User> CREATOR = new Creator<User>() {
        @Override
        public User createFromParcel(Parcel in) {
            return new User(in);
        }

        @Override
        public User[] newArray(int size) {
            return new User[size];
        }
    };

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return mName;
    }

    public void setName(String mName) {
        this.mName = mName;
    }

    public String getPassword() {
        return mPassword;
    }

    public void setPassword(String mPassword) {
        this.mPassword = mPassword;
    }

    public Sex getSex() {
        return mSex;
    }

    public void setSex(Sex sex) {
        this.mSex = sex;
    }


    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(id);
        dest.writeString(mName);
        dest.writeString(mPassword);
    }
}
